import request from '@/utils/request'

// 查询单证管理列表
export function listBills(query) {
  return request({
    url: '/kmwlpts/expHeavy/list',
    method: 'get',
    params: query
  })
}

// 查询单证管理详细
export function getBills(billCode) {
  return request({
    url: '/kmwlpts/expHeavy/' + billCode,
    method: 'get'
  })
}

// 新增单证管理
export function addBills(data) {
  return request({
    url: '/kmwlpts/expHeavy',
    method: 'post',
    data: data
  })
}

// 修改单证管理
export function updateBills(data) {
  return request({
    url: '/kmwlpts/expHeavy',
    method: 'put',
    data: data
  })
}

// 删除单证管理
export function delBills(billCode) {
  return request({
    url: '/kmwlpts/expHeavy/' + billCode,
    method: 'delete'
  })
}

// 导出单证管理
export function exportBills(query) {
  return request({
    url: '/kmwlpts/expHeavy/export',
    method: 'get',
    params: query
  })
}


//申报单证
export function declareGbills(billCode) {
  return request({
    url: '/kmwlpts/expHeavy/declare/' + billCode,
    method: 'post'
  })
}


// 查询确报信息列表
// export function queryQbVehicles(manifiestId) {
//   return request({
//     url: '/kmwlpts/bindingRoadTransport/queryQb/'+manifiestId,
//     method: 'post',
//   })
// }/kmwlpts/ManifestRoadListGoods

//查询舱单货物列表
export function queryQbVehicles(manifiestId) {
  return request({
    url: '/kmwlpts/ManifestRoadListGoods/getlist/' + manifiestId,
    method: 'get',
  })
}


// 根据车牌号查询车辆备案的IC卡号
export function findIcCardByVeNo(veNo) {
  return request({
    url: '/kmwlpts/preVehicleRecordingLog/findCardByVeNo/' + veNo,
    method: 'post',
  })
}


// 单证退单
export function declChargeback(billCode) {
  return request({
    url: '/kmwlpts/expHeavy/declChargeback/' + billCode,
    method: 'post',
  })
}
